<template>
    <div>
        <div class="ui-title">
            <div class="ui-title-back" @click="hideWindow"></div>
            <div class="ui-title-text">文章详情</div>
            <div class="ui-title-btn-block">
                <!--<span class="ui-title-btn icon " onclick="location.reload();">&#xe62a;</span>-->
            </div>
        </div>
        <div class="body">
            <div class="article-title">{{title}}</div>
            <!--<div class="article-title2">{{title2}}</div>-->
            <div class="article-content" v-html="content"></div>
        </div>
    </div>

</template>

<script>
    export default {
        data: function () {
            return {
                title: "正在加载...",
                title2: "",
                content:""
            }
        },
        methods: {
            init:function () {
                var data=HASH,self=this;
                this.title=data.title;
                var xhr=new plus.net.XMLHttpRequest();
                xhr.open('get',data.url);
                xhr.onload=function(res){
                    //var data = JSON.parse(res.target.responseText);
                    self.content = res.target.responseText;
                }
                xhr.send();
            },
            hideWindow:function(){
                window.hideWebview()
                this.title="";
                this.title2="";
                this.content='正在加载...';
            }
        },
        mounted: function () {
            this.init();
        }
    }

</script>

